process {

    withName: SEQKIT_SANA {
        ext.prefix = { "${meta.id}_${meta.strandness}" }
    }

    withName: SEQKIT_SEQ {
        ext.args = [
            "--remove-gaps",
            "--upper-case",
            "--validate-seq",
            "--min-len 30",
            "--max-len 5000"
        ].join(' ').trim()
        ext.prefix = { "intermediate_seqkit_seq_${meta.strandness}" }
    }

    withName: SEQKIT_REPLACE {
        ext.args   = '-p "/" -r "_"'
        ext.suffix = ".fasta"
        ext.prefix = { "intermediate_seqkit_replace_${meta.strandness}" }
    }

    withName: SEQKIT_RMDUP {
        ext.prefix = { "${meta.id}_${meta.strandness}" }
    }

}
